<?php if ($this->Session->read('Auth.User.role_id') == 1 || $this->Session->read('Auth.User.role_id') == 2) { ?>
<div id="breadcrumbs"><?php echo $this->Html->link('Home', array('controller' => 'contents', 'action' => 'view', 'home')); ?> > <?php echo $this->Html->link('List Subscribers', array('controller' => 'Subscribers', 'action' => 'index')); ?> > Add Subscriber
</div>

<div class="archivednl index">
    <?php
    echo $this->Form->create('Subscriber', array(
        'inputDefaults' => array(
            'required' => false,
        ),
    ));
    ?>
    <fieldset>
        <h2><?php echo __('Please Enter Your Details to Subscribe for a Newsletter'); ?></h2>
        <?php
        echo $this->Form->input('sub_name', array('label' => 'Full Name'));
        echo "<br>";
        echo $this->Form->input('sub_organisation', array('label' => 'Organisation (Optional)'));
        echo "<br>";
        echo $this->Form->input('sub_email', array('label' => 'Email Address'));
        echo "<br>";
        echo $this->Form->input('confirm_email', array('label' => 'Confirm Email Address'));
        echo "<br>";
        $this->Form->input('sub_active');
        ?>  
        <b> <?php echo 'Please enter security code to subscribe:'; ?></b> 
        <table>
            <tr>
                <td style="width: 80px; border: none"><?php echo $this->Html->image($this->Html->url(array('action' => 'captcha'), true), array('style' => '', 'vspace' => 2)); ?></td>
                <td style="float: left; padding-top: 13px; width: 150px; border: none;"> <?php echo $this->Form->input('Signup.captcha', array('autocomplete' => 'off', 'label' => false, 'class' => '')); ?></td>
            </tr>
        </table>
    </fieldset>
<?php echo $this->Form->end(__('Subscribe Now')); ?>
<br>
</div>

<div class="actions">
        <h3><?php echo __('Actions'); ?></h3>
        <ul>
            <li><?php echo $this->Html->link('List Subscribers',array('action'=>'index'));?></li>
        </ul>
    </div>

<?php }else { ?>
<div id="breadcrumbs"><?php echo $this->Html->link('Home', array('controller' => 'contents', 'action' => 'view', 'home')); ?> > Subscribe Newsletter
</div>
    <?php
    echo $this->Form->create('Subscriber', array(
        'inputDefaults' => array(
            'required' => false,
        ),
    ));
    ?>
    <fieldset>
        <h2><?php echo __('Please Enter Your Details to Subscribe for a Newsletter'); ?></h2>
        <?php
        echo $this->Form->input('sub_name', array('label' => 'Full Name'));
        echo "<br>";
        echo $this->Form->input('sub_organisation', array('label' => 'Organisation (Optional)'));
        echo "<br>";
        echo $this->Form->input('sub_email', array('label' => 'Email Address'));
        echo "<br>";
         echo $this->Form->input('confirm_email', array('label' => 'Confirm Email Address'));
        echo "<br>";
        $this->Form->input('sub_active');
        ?>  
        <b> <?php echo 'Please enter security code to subscribe:'; ?></b> 
        <table>
            <tr>
                <td style="width: 80px; border: none"><?php echo $this->Html->image($this->Html->url(array('action' => 'captcha'), true), array('style' => '', 'vspace' => 2)); ?></td>
                <td style="float: left; padding-top: 13px; width: 150px; border: none;"> <?php echo $this->Form->input('Signup.captcha', array('autocomplete' => 'off', 'label' => false, 'class' => '')); ?></td>
            </tr>
        </table>
    </fieldset>
<?php echo $this->Form->end(__('Subscribe Now')); ?>
<br>
<?php } ?>

